package cn.edu.ecut.servlet ;

import java.time.LocalDateTime;
import java.io.PrintWriter ;
import java.io.IOException ;

import javax.servlet.Servlet ;
import javax.servlet.ServletConfig ;
import javax.servlet.ServletRequest ;
import javax.servlet.ServletResponse ;
import javax.servlet.ServletException ;

public class HelloServlet implements Servlet {

	public void init( ServletConfig config ) throws ServletException {
	}

	public void service( ServletRequest req , ServletResponse resp )
		throws ServletException , IOException {

		PrintWriter out = resp.getWriter();
		out.println( "<h1 style='color:red;text-align:center;border:1px solid blue ;'>");
		out.println( LocalDateTime.now() );
		out.println( "</h1>" );

	}

	public void destroy() {
	}

	public ServletConfig getServletConfig() {
		return null ;
	}

	public String getServletInfo() {
		return null ;
	}

}
